import { useEffect } from "react"
import { useRoutes, useNavigate } from "react-router-dom"
import routes from "./router/index"
import http from "@/http/index"

function App() {
  const navigate = useNavigate()
  useEffect(() => {
    http.setNavigate(navigate)
  }, [navigate])
  const outLet = useRoutes(routes)
  return outLet
}

export default App
